package com.xls.boxlibrary.tixianjilu;

import android.app.Fragment;

import androidx.fragment.app.FragmentActivity;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager2.adapter.FragmentStateAdapter;


import com.xls.boxlibrary.Consts.IntentConsts;
import com.xls.boxlibrary.mvp.BasePresenterImpl;
import com.xls.boxlibrary.tixianjilu.jifenduihuanjilu.JiFenDuiHuanJiLuFragment;
import com.xls.boxlibrary.tixianjilu.jinbitixianjilu.JinBiTiXianJiLuFragment;

import java.util.ArrayList;

/**
 * MVPPlugin
 */

public class TiXianJiLuPresenter extends BasePresenterImpl<TiXianJiLuContract.View> implements TiXianJiLuContract.Presenter{
    FragmenAdapter fragmentAdapter;

    @Override
    public FragmentStateAdapter getViewPageAdapter() {
        if (fragmentAdapter==null){
            fragmentAdapter=new FragmenAdapter((FragmentActivity) mView.getActivity(),getAPPid());
        }
        return fragmentAdapter;
    }

    private String getAPPid() {
        return activity.getIntent().getStringExtra(IntentConsts.id);
    }
}
